import React, {useEffect, useState} from 'react';
import Search from './components/searchTool'
import QuertTable from './components/queryTable'
import service from '../../../../api'
import './index.scss'
import {clientList} from "../../../../api/lytApi/Query";

const Query = () => {

    const [dataList,setDataList] = useState([]);

    useEffect(()=>{
        queryList().then(r => {});
    },[])

    const queryList = async () =>{
        const res = await service.lytApi.clientList({})
        setDataList(res.data)
        console.log(res.data)
    }

    return (
        <div className='CusQueryMain'>
            <Search />

            <div className="CusQueryMain__tablehDiv">
                <QuertTable message={dataList}/>
            </div>
        </div>
    );
};

export default Query;